package com.whfc.hdc.service;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.hdc.dto.AppDevicePlatformDTO;

import java.util.List;
import java.util.Map;

/**
 * @Description: 硬件平台服务
 * @author: xugcheng
 * @version: 1.0
 * @date: 2021-11-30 15:03
 */
public interface AppDevicePlatformService {

    /**
     * 查询硬件平台
     *
     * @return
     * @throws BizException
     */
    Map<Integer, List<AppDevicePlatformDTO>> getDevicePlatform() throws BizException;

    /**
     * 查询硬件平台
     *
     * @param deviceType 硬件类型
     * @return
     * @throws BizException
     */
    List<AppDevicePlatformDTO> getDevicePlatform(Integer deviceType) throws BizException;

    /**
     * 查询硬件平台
     *
     * @param deviceType
     * @param pageNum
     * @param pageSize
     * @return
     * @throws BizException
     */
    PageData<AppDevicePlatformDTO> getDevicePlatform(Integer deviceType, Integer pageNum, Integer pageSize) throws BizException;

    /**
     * 判断硬件类型和厂家是否存在
     *
     * @param deviceType
     * @param platform
     * @return
     * @throws BizException
     */
    boolean existsDevicePlatform(Integer deviceType, String platform) throws BizException;

    /**
     * 添加硬件厂家
     *
     * @param platformDTO
     * @throws BizException
     */
    void addDevicePlatform(AppDevicePlatformDTO platformDTO) throws BizException;

    /**
     * 编辑硬件厂家
     *
     * @param platformDTO
     * @throws BizException
     */
    void editDevicePlatform(AppDevicePlatformDTO platformDTO) throws BizException;

    /**
     * 删除硬件厂家
     *
     * @param deviceType
     * @param platform
     * @throws BizException
     */
    void delDevicePlatform(Integer deviceType, String platform) throws BizException;
}
